<template>
  <div>
    <ul>
      <li v-for="(item,index) in list" :key="`id_${index}`">
        <span v-if="!render">{{item.name}}</span>
        <render-dom v-else :render-func="render" :name="item.name"></render-dom>
      </li>
    </ul>
  </div>
</template>

<script>
import renderDom from '@/components/render-dom'
export default {
  components:{
    renderDom
  },
  name: "list",
  props: {
    list: {
      type: Array,
      default: () => [],
    },
    render: {
      type: Function,
      default: () => {},
    },
  },
};
</script>

<style>
</style>
